package itheima.jdk8.stream;


import java.util.Arrays;
import java.util.List;

public class StreamTest3 {

    public static void main(String[] args) {

        List<Integer> list = Arrays.asList(-1,1, 2);
        list.stream().map(i -> 2 * i).forEach(g->{
            System.out.println(g-1);
        });
        System.out.println("阿哈哈哈=======>"+ list);

        System.out.println(list.stream().map(i -> 2 * i).reduce(0, Integer::sum));
    }
}
